import React from 'react'

class Navbar extends React.Component {
    constructor(props) {
        super(props)
        this.state = {
           isshow:true
        }
    }
    componentDidMount() {
        this.setState({
            title: this.props.title,
         
            
        })
    }
    render() {
        return (
            <div>
                <div style={{display:this.state.isshow?"black":"none"}}>{this.state.title}</div>
            <button onClick={()=>{
                this.props.sendMessage("navbar")
                console.log(this.isshow)
            }}>
                点击
            </button>
            </div>

            
        )
    }
}

export default Navbar